package com.dv.driverless.service.impl;

import java.util.List;
import com.dv.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dv.driverless.mapper.SteelCoilMapper;
import com.dv.driverless.domain.SteelCoil;
import com.dv.driverless.service.ISteelCoilService;

/**
 * 钢卷信息Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-11
 */
@Service
public class SteelCoilServiceImpl implements ISteelCoilService
{
    @Autowired
    private SteelCoilMapper steelCoilMapper;

    /**
     * 查询钢卷信息
     *
     * @param id 钢卷信息主键
     * @return 钢卷信息
     */
    @Override
    public SteelCoil selectSteelCoilById(Long id)
    {
        return steelCoilMapper.selectSteelCoilById(id);
    }

    /**
     * 查询钢卷信息列表
     *
     * @param steelCoil 钢卷信息
     * @return 钢卷信息
     */
    @Override
    public List<SteelCoil> selectSteelCoilList(SteelCoil steelCoil)
    {
        return steelCoilMapper.selectSteelCoilList(steelCoil);
    }

    /**
     * 新增钢卷信息
     *
     * @param steelCoil 钢卷信息
     * @return 结果
     */
    @Override
    public int insertSteelCoil(SteelCoil steelCoil)
    {
        steelCoil.setCreateTime(DateUtils.getNowDate());
        return steelCoilMapper.insertSteelCoil(steelCoil);
    }

    /**
     * 修改钢卷信息
     *
     * @param steelCoil 钢卷信息
     * @return 结果
     */
    @Override
    public int updateSteelCoil(SteelCoil steelCoil)
    {
        steelCoil.setUpdateTime(DateUtils.getNowDate());
        return steelCoilMapper.updateSteelCoil(steelCoil);
    }

    /**
     * 批量删除钢卷信息
     *
     * @param ids 需要删除的钢卷信息主键
     * @return 结果
     */
    @Override
    public int deleteSteelCoilByIds(Long[] ids)
    {
        return steelCoilMapper.deleteSteelCoilByIds(ids);
    }

    /**
     * 删除钢卷信息信息
     *
     * @param id 钢卷信息主键
     * @return 结果
     */
    @Override
    public int deleteSteelCoilById(Long id)
    {
        return steelCoilMapper.deleteSteelCoilById(id);
    }
}
